package com.pearl.boot.rabbitmq;


import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.amqp.support.AmqpHeaders;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Component;

import java.io.IOException;

/**
 * @author TangDan
 * @version 1.0
 * @since 2022/11/9
 */
@Component

public class RabbitConsumer {

/*    @RabbitListener(queues = {"bootQueue001"})
    public void receiveMessage001(Message message) {
        System.out.println("bootQueue001收到消息===" + new String(message.getBody()));
    }*/

/*    @RabbitListener(bindings = {
            @QueueBinding(exchange = @Exchange("bbdbdbdb"), value = @Queue("dsfsf"), key = {"aaa.key"})
    })
    public void receiveMessage(Message message) {
        System.out.println("备份交换机收到消息" + new String(message.getBody()));
        System.out.println("发送告警信息给管理员");
        System.out.println("存入数据库等待人工处理");
    }*/
}
